<#import "/common/common.ftl" as common/>
<#import "/spring.ftl" as spring/>
<!DOCTYPE html>
<html>
  <head>
    <meta charset="utf-8">
    <title>万联智件</title>
    <link rel="icon" href="<@spring.url '/images/fac.ico' />" type="image/x-icon" />
	<link rel="shortcut icon" href="<@spring.url '/images/fac.ico' />" type="image/x-icon" />
	<link rel="bookmark" href="<@spring.url '/images/fac.ico' />" type="image/x-icon" />
    <meta name="viewport" content="width=device-width,initial-scale=1.0,maximum-scale=1.0,minimum-scale=1.0,user-scalable=no">
    <@common.importBaseCSS/>
    <link rel="stylesheet" type="text/css" href="<@common.urlRandom '/css/index.css' />">
    <link rel="stylesheet" type="text/css" href="<@common.urlRandom '/css/iconfont.css' />">
    <script>	
	    location._CTX=top._CTX  = "<@spring.url '' />";
	</script>
	<style>
	[v-cloak] {
	    display: none;
	}
	</style>
  </head>
  <body>
    <div id="app" v-cloak>
	    <div class="home">
	    <template>
         <header class="head-nav">
	        <el-col class='logo-container'>
	          <img :src="iconUrl" class='logo' alt="">
	        </el-col>
	        <el-col class='inside-menu'>
	          <i class="el-icon-menu cursorm" @click="changeMenuStyle"></i>
	        </el-col>
	        <el-col class='inside-tools'>
	        	<el-col :span="12">
		          <el-menu theme="dark" :default-active="router.curRouter.header" @select="menuTo" class="el-menu-demo" mode="horizontal"
		            background-color="#324057"
					  text-color="#fff"
					  active-text-color="#ffd04b">          
		            <el-menu-item
		              v-for='(item,index) in router.menus'
		              :index="item.path"
		              :key='item.path'>
		              {{item.name}}
		            </el-menu-item>
		          </el-menu>
		        </el-col>
		        <el-col :span="6">
		        	&nbsp;
		        </el-col>
		        <el-col :span="6" >
		        	<el-col :span="16" style="text-align:center;">
		        		<div style="height: 60px;line-height: 60px" >{{time}}</div>
		        	</el-col>		        	
		        	<el-col :span="8" class="userinfo">
		        	<span class='username'>
	                    <el-dropdown
	                      trigger="hover">
	                        <span class="el-dropdown-link">
	                        ${User.name!''}<i class="el-icon-caret-bottom el-icon--right"></i>
	                        </span>
	                        <el-dropdown-menu slot="dropdown" >
	                            <!-- 
	                            <el-dropdown-item divided >
		                            <div v-on:click="modifyPassword('${User.id!''}')">
										<el-row>
										  <el-col :span="24">
										  	  <i   style="font-style:normal;">修改密码</i>
										  </el-col>
										</el-row>
		                            </div>
	                            </el-dropdown-item>
	                             -->
	                            <el-dropdown-item command='logout' divided >
		                            <div v-on:click='logout'>
										<el-row>
										  <el-col :span="24">
										  	  <i   style="font-style:normal;">退出账号</i>
										  </el-col>
										</el-row>
		                            </div>
	                            </el-dropdown-item>
	                            
	                            
	                        </el-dropdown-menu>
	                    </el-dropdown>
	                </span>                
		        	</el-col>
		        </el-col>
	        </el-col>
	    </header>
	   </template>
	<div class="left-fixed-right-auto">
<template>
  <div class="left" :style="{'height':'100%','width':router.leftmenu.menu_flag? '191px' : '80px'}"  id='admin-left'>
    <div id='left-menu'>
      <el-row class='tac' style="padding:0;"
      v-for="(route,index) in router.menus"
      :key='route.path'
      v-if='router.curRouter.header===route.path'>
        <el-col :span="24">
          <el-menu
            class="el-menu-vertical-demo"
            :default-active="router.curRouter.item" 
            background-color="#1F2D3D"
            active-text-color="#ffd04b"
            text-color="#fff"
            unique-opened
            :default-openeds="subMenuIndexs">
            <template
              v-for="(item,index) in route.children" >
              <el-submenu :index="item.path" >
                <template slot="title">
                  <el-tooltip
                    class="item"
                    placement="right"
                    :disabled="router.leftmenu.menu_flag"
                    :content="item.name">
                    <i :class="item.icon"></i>
                  </el-tooltip>
                  <span class='menu-name'
                    v-if="router.leftmenu.menu_flag">{{item.name}}</span>
                </template>
				<el-menu-item
                  :style="{'padding-left':router.leftmenu.menu_flag? '40px' : '23px'}"
                  :index='child.path' 
                  v-for='(child,cindex) in item.children'
                  :key='child.path'
                  @click="addTab(child)">
                  <el-tooltip
                    class="item"
                    effect="dark"
                    placement="right"
                    :disabled="router.leftmenu.menu_flag"
                    :content="child.name">
                    <i :class="child.icon"></i>
                  </el-tooltip>
                  <span
                    class='menu-name'
                    v-if="router.leftmenu.menu_flag">{{child.name}}
                  </span>
                </el-menu-item>
              </el-submenu>
            </template>
          </el-menu>
        </el-col>
      </el-row>
    </div>
  </div>
</template>
		      <div :class="router.leftmenu.menu_flag?'right-content':'right-content1'">
		        <section class="content-container">
					<el-tabs v-model="router.curRouter.item"  closable @tab-remove="removeTab" @tab-click="onTabClick" style="height:100%;width:100%;">
					  <el-tab-pane
					    v-for="(item, index) in tabs.list"
					    :key="item.path"
					    :label="item.name"
					    :name="item.path" style="height:100%;">
						<iframe :src="item.path" width="100%" style="border: none;height:100%;"></iframe>
					  </el-tab-pane>
					</el-tabs>
				</section>
		      </div>
		    </div>
		  </div>
		  <audio  autoplay="autoplay" ref="auto" src=""></audio>
    </div>
    <@common.importBaseJs/>
	<script type="text/javascript" src="<@common.urlRandom '/js/app/index.js' />"></script> 

	
  </body>
</html>